<template>
	<view>
		<!-- 购买记录 -->
		<template v-if="isBuyPage">
			<view class="team-item" v-for="(item,index) in list" :key="index">
				<view class="team-item-left">
					<view class="team-item-leftView">
						<view class="team-left-text marginBottom">{{item.desc}}</view>
						<view class="team-left-title">{{item.time}}</view>
					</view>
					<view>
						<view class="team-item-right colorf37">+{{item.price1}}</view>
					</view>
				</view>
				<view class="team-item-right">{{item.price}}</view>
			</view>
		</template>
		<!-- 收益明细领取记录 -->
		<template v-else-if="isReceive">
			<view class="team-item" v-for="(item,index) in list" :key="index">
				<view class="team-item-left">
					<view class="team-left-title marginBottom">{{item.time}}</view>
					<view class="team-left-text">{{item.desc}}</view>
				</view>
				<view class="team-item-right1">{{item.price}}</view>
				<view class="team-tag-view" v-if="item.status == 3">国粮金卡赠送</view>
				<view class="team-tag-view1" v-if="item.status == 2">每日领取国粮</view>
				<view class="team-tag-view1" v-if="item.status == 4">国粮每日收益</view>
			</view>
		</template>
		 <!-- 收益明细购买记录 -->
		 <template v-else-if="isBuyHistory">
			 <view class="team-item" v-for="(item,index) in list" :key="index">
			 	<view class="team-item-left">
					<view class="team-left-text marginBottom">{{item.desc}}</view>
			 		<view class="team-left-title marginBottom">订单号: {{item.order}}</view>
					<view class="team-left-title marginBottom">购买时间: {{item.time}}</view>
					<view class="team-left-title marginBottom">购买金额: {{item.money}}</view>
			 	</view>
				<!-- <view class="team-item-rightBtn" @click="$emit('cardstatusClick')">去使用</view> -->
				<template v-if="item.type == 1 && item.status == 1 &&  item.cardstatus == 0 ">
					<view class="team-item-rightBtn" @click="$emit('cardstatusClick',item.id)">去使用</view>
				</template>
				<template v-else-if="item.type == 1 && item.status == 1 &&  item.cardstatus == 1">
					<view class="team-item-right color99">已使用</view>
				</template>
			 	<template v-else>
					<view class="team-item-right" :class="item.status == 0 ?'colorf37':'color99'">{{item.status == 0 ?'审核中':'购买成功'}}</view>
				</template>
				
			 </view>
		 </template>
		 <!-- 提现明细 -->
		<template v-else>
			<view class="team-item" v-for="(item,index) in list" :key="index">
				<view class="team-item-left">
					<view class="team-left-title marginBottom">{{item.time}}</view>
					<view class="team-left-text">{{item.desc}}</view>
				</view>
				<view class="team-item-right colorf37">{{item.price}}</view>
			</view>
		</template>
	</view>
</template>

<script>
	export default {
		props:{
			list:Array,
			// 是否是购买列表
			isBuyPage:Boolean,
			// 是否是收益明细购领取列表
			isReceive:Boolean,
			// 是否是收益明细购买列表
			isBuyHistory:Boolean,
		},
		data(){
			return{
				
			}
		},
		methods:{
			
		}
	}
</script>

<style lang="scss">
	.team-left-desc{
		display: flex;
	}
	.team-tag-view1{
		position: absolute;
		top: 0;
		right: 0;
		padding: 10rpx 20rpx;
		font-size: 12px;
		color: #ffffff;
		border-radius: 0px 10px 0px 10px;
		background: #18b566;
	}
	.team-tag-view{
		position: absolute;
		top: 0;
		right: 0;
		padding: 10rpx 20rpx;
		font-size: 12px;
		color: #F34602;
		border-radius: 0px 10px 0px 10px;
		background: #FFE9D2;
	}
	.team-item-leftView{
		display: flex;
	}
	.marginBottom{
		margin-bottom: 20rpx;
	}
	.team-item{
		display: flex;
		align-items: center;
		justify-content: space-between;
		background-color: #FFF0CA;
		border-radius: 20rpx;
		padding: 20rpx;
		margin-bottom: 30rpx;
		position: relative;
		.team-item-left{
			.team-left-title{
				font-size: 12px;
				color: #999999;
			}
			.team-left-text{
				font-size: 15px;
				font-weight: bold;
				color: #333333;
				margin-right: 20rpx;
			}
			.team-left-text1{
				font-size: 15px;
				color: #333333;
				margin-right: 20rpx;
			}
		}
		.colorf37{
			color: #F37F02;
		}
		.color99{
			color: #999999;
		}
		.team-item-right{
			font-size: 14px;
		}
		.team-item-right1{
			margin-top: 30rpx;
			font-size: 14px;
			color: #999999;
		}
		.team-item-rightBtn{
			padding: 10rpx 30rpx;
			background-color: #FFF0CA;
			border-radius: 30rpx;
			color: #ffffff;
			font-size: 14px;
		}
	}
</style>